package de.alfenory.autobill.entity;

import java.util.Objects;

/**
 *
 * @author alefen
 */
public class TaxType {
    int id;
    double vat;
    String account;

    public TaxType(int id, double vat, String account) {
        this.id = id;
        this.vat = vat;
        this.account = account;
    }

    public int getId() {
        return id;
    }

    public double getVat() {
        return vat;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setVat(double vat) {
        this.vat = vat;
    }

    public String getAccount() {
        return account;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 23 * hash + this.id;
        hash = 23 * hash + (int) (Double.doubleToLongBits(this.vat) ^ (Double.doubleToLongBits(this.vat) >>> 32));
        hash = 23 * hash + Objects.hashCode(this.account);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final TaxType other = (TaxType) obj;
        if (this.id != other.id) {
            return false;
        }
        if (Double.doubleToLongBits(this.vat) != Double.doubleToLongBits(other.vat)) {
            return false;
        }
        if (!Objects.equals(this.account, other.account)) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "TaxType{" + "id=" + id + ", vat=" + vat + ", account=" + account + '}';
    }
    
    
}